<template>
    <div>
        <TypeNav/>
        <ListContainer/>
        <Recommend/>
        <Rank/>
        <GuessLike/>
        <Floor v-for="floor in floorList" :key="floor.id" :list="floor"/>
        <Brand/>
    </div>
</template>

<script>
import ListContainer from '@/views/Home/ListContainer';
import Recommend from '@/views/Home/Recommend';
import Rank from '@/views/Home/Rank';
import GuessLike from '@/views/Home/GuessLike';
import Floor from '@/views/Home/Floor';
import Brand from '@/views/Home/Brand';
import { mapState } from 'vuex';
export default {
    name: '',
    components: {
        ListContainer,
        Recommend,
        Rank,
        GuessLike,
        Floor,
        Brand
    },
    mounted() {
        //派发action，获取floor组件数据
        this.$store.dispatch("getFloorList");
    },
    computed: {
        ...mapState({
            floorList: state => state.home.floorList
        })
    }
}
</script>
